<template>
	<view class="container">

		<!-- 商品信息 -->
		<view class="goods-info">
			<image mode="widthFix" style="width: 100%;" :src="goods.image"></image>
			
			<!-- 标题、分享 -->
			<view class="info-item info-item__name">
				<view class="goods-name flex-box">
					<text>{{ goods.name }}</text>
				</view>
			</view>
			<!-- 价格、销量 -->
			<view class="info-item info-item__top ">
				<view style="padding-top: 20rpx;">
					<!-- 商品售价 -->
					<text class="floor-price__samll">￥</text>
					<text class="floor-price">{{ goods.price }}</text>
				</view>
			</view>
		</view>

		<view class="info_view">
			<view class="title_view">
				<view class="icon">
					<image src="/static/info_icon.png" class="image_icon"></image>
				</view>
				<view class="title">
					商品详情
				</view>
			</view>
			<view>
				<image :src="goods.detail_image" mode="widthFix" style="width: 100%;"></image>
			</view>
		</view>

	</view>
</template>

<script>
	import * as api from '@/api/activity'
	export default {
		components: {},
		data() {
			return {
				// 商品详情
				goods: {
					image: "",
					price: "",
					name: "",
					detail_image: "",
				},
			}
		},
		onLoad(options) {
			api.platformBoxPrizeInfo({
				id: options.id
			}).then(res => {
				this.goods = res.data;
			});
		},
		methods: {

		},
	}
</script>

<style>
	page {
		background: #fafafa;
	}
</style>

<style lang="scss" scoped>
	/* 商品信息 */
	.goods-info {
		background: #fff;
		padding: 25rpx 30rpx;
	}
	.info-item__top {
		min-height: 40rpx;
		margin-bottom: 20rpx;
	}
	.info-item__top .active-tag {
		width: 108rpx;
		color: #fff;
		background: #fe293f;
		padding: 3rpx 5rpx;
		border-radius: 15rpx;
		font-size: 24rpx;
		text-align: center;
		margin-right: 15rpx;
	}
	.floor-price__samll {
		font-size: 26rpx;
		line-height: 1;
		color: #FA2209;
	}
	/* 商品价 */
	.floor-price {
		color: #FA2209;
		margin-right: 15rpx;
		font-size: 38rpx;
		line-height: 1;
		margin-bottom: -2rpx;
	}
	.info-item__name .goods-name {
		font-size: 34rpx;
		padding-top: 20rpx;
	}
	/* 活动详情介绍 */
	.image_icon {
		width: 50rpx;
		height: 50rpx;
	}
	.info_view > .title_view {
		background-color: #F9F9F7;
		padding: 40rpx 0rpx 40rpx 30rpx;
	}
	.info_view > .title_view > .icon {
		display: block;
		float: left;
		padding-right: 15rpx;
	}
	.info_view > .title_view > .title {
		display: block;
		font-weight: bold;
	}
</style>